﻿using System;

namespace CXW.Core
{
    public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);

    public class PropertyChangedEventArgs : EventArgs
    {
        /// <returns>
        /// returns the changed property object
        /// </returns>
        public Properties Properties { get; private set; }

        /// <returns>
        /// The key of the changed property
        /// </returns>
        public string Key { get; private set; }

        /// <returns>
        /// The new value of the property
        /// </returns>
        public object NewValue { get; private set; }

        /// <returns>
        /// The new value of the property
        /// </returns>
        public object OldValue { get; private set; }

        public PropertyChangedEventArgs(Properties properties, string key, object oldValue, object newValue)
        {
            Properties = properties;
            Key = key;
            OldValue = oldValue;
            NewValue = newValue;
        }
    }
}
